package com.lovo.sys.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lovo.sys.bean.SupplyBean;
import com.lovo.sys.service.ISupplyService;
import com.lovo.sys.vo.SupplyOrderInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("supply")
public class SupplyController {
    @Autowired
    private ISupplyService ISupplyService;
    @GetMapping("findAll")
    public IPage<SupplyBean> findAll(Integer pageNum) {
        return ISupplyService.findAll(pageNum);
    }
    @GetMapping("findById")
    public List<SupplyOrderInfoVo> findById(String idNum){
        return ISupplyService.findById(idNum);
    }
    @GetMapping("tuihuo")
    public String tuiHuo(String idNum){
        ISupplyService.tuiHuo(idNum);
        return "ok";
    }
}
